package org.hospital.service;

import java.util.List;

import org.hospital.entity.Clinic;
import org.hospital.entity.Department;

import com.alibaba.fastjson.JSONArray;

public interface DepartmentService {
	/**
	 * 获取持久化对象
	 * @param clinicId
	 * @return
	 */
	Department getByid(int departmentId);
	/**
	 * merge 方法插入 数据库
	 * @param entity
	 * @return
	 */
	Department addEntity(Department entity);
	
	/**
	 * merge 方法插入 数据库
	 * @param entity
	 * @return
	 */
	Department saveEntity(Department entity);
	
	/**
	 * 获取门诊下的所有部门
	 * @param clinicId
	 * @return 
	 * 		[clinicId,clinicName,departmentName,departmentId,
	 * 		principalCode,principalId,principalName,creatorId,creatorName,
	 * 		phone,createTime]
	 */
	JSONArray getClinicAllDepartment(int clinicId);
	
	/**
	  * 获取所有部门
	 * @param
	 * @return 
	 * 		[clinicId,clinicName,departmentName,departmentId,
	 * 		principalCode,principalId,principalName,creatorId,creatorName,
	 * 		phone,createTime
	 */
	JSONArray getAllDepartment();
}
